Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix createReducer initialState logic #33

Merged
merged 2 commits into from
Aug 8, 2018
Merged

Conversation

LPGhatguy
Copy link
Contributor

@LPGhatguy LPGhatguy commented Aug 8, 2018

Right now, action handlers aren't run at all if initialState is nil. They also won't run if state ever returns back to nil!

This isn't how we want createReducers to work I think, since it means you can't have nil as a state for your reducer!

This is a small fix to fix that.

Checklist before merge:

  • Update tests
  • Changelog entry

@coveralls
Copy link

coveralls commented Aug 8, 2018

Coverage Status

Coverage remained the same at 99.351% when pulling 371bb5c on fix-createreducer into e7ecee1 on master.

@ZoteTheMighty
Copy link
Contributor

I've confirmed that this resolves the bug that I was having 👍

@LPGhatguy LPGhatguy requested a review from ZoteTheMighty August 8, 2018 17:44
Copy link
Contributor

@ZoteTheMighty ZoteTheMighty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants